<?php
/**
 * StudentGuardian form
 *
 * @version $Id: StudentGuardian.php 73 2010-04-25 00:30:44Z yingkuang.chen@gmail.com $
 * @license New BSD License
 * @uses Zend_Form
 * @package student
 * @subpackage Form
 */
class Student_Form_StudentGuardian extends Sfs_Form
{

protected $_arrayData;
    function __construct($options=null){
        $locale = Bootstrap::$config['resources']['locale']['default'];
        $path = dirname(__FILE__)."/../languages/$locale/data.ini";
        $ini = new Zend_Config_Ini($path);
        $this->_arrayData = $ini->get('array_data')->toArray();

        parent::__construct($options);
    }
    /**
     * initialization routine
     *
     * @return void
     */
    public function init()
    {
        $this->setMethod('post');
        $this->addElement('hidden', 'sn', array(
        	'label'      => 'sn',
        	'decorators' => $this->noElementDecorator,
        	'filters'    => array('StringTrim'),
        	'validators' => array('int')
        	)
        );
        $this->addElement('text', 'name', array(
        	'label'      => 'name',
        	'required'   => true,
            'size' => 10,
        	'filters'    => array('StringTrim','StripTags'),
        //	'validators' => array()
        	)
        );
        $this->addElement('text', 'identification_number', array(
        	'label'      => 'identification_number',
        	'size'	=> 10,
        	'filters'    => array('StringTrim','StripTags'),
        //	'validators' => array()
        	)
        );
        $this->addElement('text', 'address', array(
        	'label'      => 'address',
        	'required'   => true,
            'size'=>26,
        	'filters'    => array('StringTrim','StripTags'),
        //	'validators' => array()
        	)
        );
        $relation = $this->_arrayData['relation'];
       // $relation = array_merge(array(''),$relation);
        $this->addElement('select', 'relation', array(
        	'label'      => 'relation',
        	'required'   => true,
        	'filters'    => array('StringTrim','StripTags'),
            'multiOPtions'=>$relation
        //	'validators' => array()
        	)
        );
        $this->addElement('text', 'organ', array(
        	'label'      => 'organ',
        	'size'		=> 12,
        	'filters'    => array('StringTrim','StripTags'),
        //	'validators' => array()
        	)
        );
        $this->addElement('text', 'organ_title', array(
        	'label'      => 'organ_title',
        	'size'		=> 12,
        	'filters'    => array('StringTrim','StripTags'),
        //	'validators' => array()
        	)
        );
        $this->addElement('text', 'phone_office', array(
        	'label'      => 'phone_office',
        	'size'		=> 12,
        	'filters'    => array('StringTrim','StripTags'),
        //	'validators' => array()
        	)
        );
        $this->addElement('text', 'phone_mobile', array(
        	'label'      => 'phone_mobile',
        	'size'		=> 12,
        	'filters'    => array('StringTrim','StripTags'),
        //	'validators' => array()
        	)
        );
        $this->addElement('text', 'email', array(
        	'label'      => 'email',
        	'size'		=> 16,
        	'filters'    => array('StringTrim','StripTags'),
        //	'validators' => array()
        	)
        );
        $this->addElement('hidden', 'student_sn', array(
            'required' => true,
        	'label'      => 'student_sn',
        		'decorators' => $this->noElementDecorator,
        	'validators' => array('int'),
        	'filters'    => array('StringTrim','StripTags'),
        //	'validators' => array()
        	)
        );

    }


}
